package image;
import java.awt.image.BufferedImage;
import java.io.*;

import javax.imageio.ImageIO;

import java.util.*;



import process.ImageErrorException;
import process.ProcIm;
import java.util.LinkedList;

/*! A vizsgalat osztalya, ezt hivja meg a felulet */
public class Analyze {
	
	private PhysiObject object;
	private CameraBuff  camera;
	LinkedList<double[]> data;

	
	//! Konstruktor	
	public Analyze(){
		object = new PhysiObject();
		camera= new CameraBuff(15);				
		data= new LinkedList<double[]>();
	}
	
	//! Kiserlet inditasa
	public void start() throws ImageErrorException{
	
		
		long timestamp=0;
		int db=1;
		
		while(db>0)
		{			
			db--;			
			OwnImage img = camera.getImage();			
			object.actualize(img);			
		}
	}	
	
	
	//! atlagsebesseg visszateritese
	/*!
	  \return double
	*/	
	public double averageSpeed(){
		return 0.0;
	}
	//! PosX visszateritese
	/*!
	  \return int
	*/
	public double getPosX() {
		return object.getPosX();
	}
	
	//! Posy visszateritese
	/*!
	  \return int
	*/
	public double getPosY() {
		return object.getPosY();
	}
	
	//! sebesseg visszateritese
	/*!
	  \return double
	*/
	public double getVelocity() {
		return object.getVelocity();
	}
	//! gyorsulas visszateritese
	/*!
	  \return double
	*/
	public double getAcceleration() {
		return object.getAcceleration();
	}
	
	//! adatok mentese	
	public void writeData(){

	}
}
